//
//  HomeYueModel.m
//  Shengzhuli
//
//  Created by FXGuo on 2017/7/24.
//  Copyright © 2017年 kamangkeji. All rights reserved.
//

#import "HomeYueModel.h"
#import "NSDate+Extension.h"

@implementation HomeYueModel

- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        self.NewType = dict[@"newType"];
        self.clubId = dict[@"clubId"];
        self.type = dict[@"type"];
        self.viewCount = [dict[@"viewCount"] integerValue];
        self.videoUrl = dict[@"videoUrl"];
        self.videoName = dict[@"videoName"];
        self.avatarUrl = dict[@"avatarUrl"];
        
        self.activityPictureUrl = [dict[@"activityPictureUrl"] componentsSeparatedByString:@"#"].firstObject;
        self.clubLogo = dict[@"clubLogo"];
        self.content = dict[@"content"];
        self.clubName = dict[@"clubName"];
        self.startDate = dict[@"startDate"];
        self.ID = dict[@"id"];
        self.title = dict[@"title"];
        self.address = dict[@"address"];
        self.applyCount = [dict[@"applyCount"] integerValue];
        self.status = dict[@"status"];
        self.isDynamic = dict[@"isDynamic"];
//        self.activityId = dict[@"activityId"];
    }
    return self;
}

+ (instancetype)objectWithDict:(NSDictionary *)dict
{
    return [[HomeYueModel alloc]initWithDict:dict];
}

@end
